package edu.neu.swc.commerce.dao;

import edu.neu.swc.commerce.entity.EcommerceUser;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * <h1>EcommerceUserDao 接口定义</h1>
 */
public interface EcommerceUserDao extends JpaRepository<EcommerceUser,Long> {


    /**
     * <h2>根据用户查询 EcommerceUser对象</h2>
     * SQL: select * from t_ecommerce_user where username = ?
     */
    EcommerceUser findByUsername(String username);

    /**
     * <h2>根据用户名和密码查询实体对象</h2>
     * SQL: select * from t_commerce_user where username=? and password=?
     */
    EcommerceUser findByUsernameAndPassword(String username, String password);

}
